<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function fn(a){
            this.a = a
        }
        var obj={}
        var getNum = fn.bind(obj);
        getNum(2);
        console.log(obj.a);//2

        //使用递归求到20的斐波那契数列之和
        function sum(num) {
            if (num==1 || num==2){
                return 1
            }
            return sum(num-2)+sum(num-1)
        }
        console.log(sum(20));
    </script>
</head>
<body>
    
</body>
</html>